# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kgeotag
pkgver=1.4.0
pkgrel=1
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> marble
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://apps.kde.org/kgeotag/"
pkgdesc="Photo geotagging program"
license="GPL-3.0-or-later"
makedepends="
	extra-cmake-modules
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	ki18n5-dev
	kxmlgui5-dev
	libkexiv2-dev
	marble-dev
	qt5-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-lang"
source="https://download.kde.org/stable/kgeotag/$pkgver/kgeotag-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
024204f2ac9df0659ad781f31d91daba6b4177f6fe2aa4219fcf91e68051e443a03efb8a3c9a9e081b126b46304dd6be935836f43d859079a070cbf46cbfac97  kgeotag-1.4.0.tar.xz
"
